package com.noreply.demo.controller;

import com.noreply.demo.dto.Resp;
import com.noreply.demo.service.JvmTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author noreply
 * @description
 * @datetime 2021/8/23 9:39
 */
@RestController
@RequestMapping("/jvm")
public class JvmTestController extends BaseController {
    @Autowired
    private JvmTestService jvmTestService;

    @GetMapping("/add/{mb}")
    public Resp addMap(@PathVariable int mb) {
        jvmTestService.generateBigBytes(mb);
        return success(mb);
    }
}
